﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel.DataAnnotations;

namespace WpfApplication2
{
    public static class IntervalValidator
    {
        public static ValidationResult Validate(Interval I)
        {
            if (I == null) return ValidationResult.Success;
            if (I.Low > I.High) return new ValidationResult("Wrong interval");
            
            return ValidationResult.Success;
        }
    }
}
